package com.lujieni.springbootio.controller;


import com.lujieni.springbootio.service.FileService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FileController {

    private FileService fileService;

    FileController(FileService fileService){
        this.fileService = fileService;
    }

    @GetMapping("/copy")
    public String copyFile(@RequestParam("file") String file){
        fileService.copyFile(file);
        return "success";
    }



}
